
// 处理文件的模块
const fs = require('fs');
// dirname
const path = require('path');
const myPath = path.join(__dirname,'./word.txt');

fs.readFile(myPath, (err, data) => {
  if (err) throw err;
  console.log(data);
  console.log(data.toString());
})